﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TransFormatView.aspx.cs" Inherits="Main_Inventory_TransFormatView" EnableEventValidation="false" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<%@ Register Src="~/User Controls/CommonControls.ascx" TagName="CommonControls" TagPrefix="MyControls" %>
<%@ Register Src="~/User Controls/Pager.ascx" TagPrefix="custom" TagName="Pager" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Transaction Format</title>
    <link rel="Stylesheet" href="../../../Styles/accounts.css" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div class="divmain">
     <acc:heading ID="pagehead" runat="server" HeadingText="Transaction Format" />
     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
       <Triggers> <asp:PostBackTrigger ControlID="controls" /> </Triggers> 
        <ContentTemplate>
         <div style="margin-left:5%; margin-right:5%; width:90%" align="center"><asp:Label ID="lblMsg" runat="server" Font-Bold="true" EnableViewState="false"></asp:Label></div> 
          <asp:UpdateProgress DynamicLayout="false" ID="UpdProgress" runat="server">
            <ProgressTemplate> <div align="center"><img src="../../../Images/ajax-loader.gif" /></div> </ProgressTemplate>
          </asp:UpdateProgress>
          <div style="margin-left:10%;">
           <div style=" padding-top:15px;  margin-left:30%;">  
               <div style="float:left;"><custom:Pager ID="custPager" runat="server" OnPageChanged="custPager_PageChanged" /></div>
               <div style="float:left; margin-left:10px;"> <MyControls:CommonControls ID="controls" runat="server" GridviewControlId="GrdDisplay" HideColumns="3,4" /> </div>
           </div> 
       
           <div id="divprint" runat="server">
            <asp:GridView ID="GrdDisplay" Width="85%" runat="server" CssClass="gridview" AlternatingRowStyle-CssClass="gridview_alternate"
                AutoGenerateColumns="false" RowStyle-CssClass="gridviewitem" PageSize="15" 
                AllowPaging="true" PagerStyle-CssClass="pgr" DataKeyNames="TFOID,TRANTYPEID,TRANTYPENAME"
                EmptyDataRowStyle-CssClass="emptyrow" OnRowCreated="GrdDisplay_RowCreated" 
                onpageindexchanging="GrdDisplay_PageIndexChanging" 
                   onselectedindexchanged="GrdDisplay_SelectedIndexChanged" 
                   onrowcommand="GrdDisplay_RowCommand">
                <Columns>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="S.No." ItemStyle-Width="25px">
                        <ItemTemplate><%#Container.DataItemIndex+1%></ItemTemplate>
                   </asp:TemplateField>
                    <asp:BoundField HeaderText="Format Name" DataField="FORMATNAME" />
                    <asp:BoundField HeaderText="Transaction Type" DataField="TRANTYPENAME"/>
                    <%--<asp:BoundField HeaderText="City" DataField="WHSCITY"  />
                    <asp:BoundField HeaderText="Active" DataField="WHSACTIVE" ItemStyle-Width="20%" />--%>
                    <asp:CommandField HeaderText="Edit" SelectText="<img src='../../../Menu/images/Edit_user.png' alt='Edit'>" ShowSelectButton="true" ItemStyle-HorizontalAlign="Center" />  
                    <asp:TemplateField HeaderText="Delete" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:LinkButton ID="LnlBtnDel" runat="server" Text='<img src=../../../Menu/images/cancel.png>' ToolTip="Delete" Visible='<%#SetControlVisible(Convert.ToInt32(Eval("TFCOUNT")))%>' CommandName="DeleteRow" CommandArgument='<%#Eval("TFOID")%>' OnClientClick="javascript:return confirm('Are you sure to delete this transaction format?')"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>       
                   </Columns>
                 <PagerStyle HorizontalAlign="Right" />
            </asp:GridView>
         </div>
        </div>
      </ContentTemplate>
     </asp:UpdatePanel> 
     </div>
    </form>
</body>
</html>
